<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>CreatePreferences</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">CreatePreferences()</font></b></p>
<p><b>Syntax</b></p><blockquote>

Result = <font color="#006666"><b>CreatePreferences</b></font>(Filename$ [, Flags])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Creates a new empty preference file. If the file already exists, the file is erased. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Filename$</i></td>
<td width="90%"> 
 
The filename of the new preference file. 

 

</td></tr>
<tr><td><i>Flags (optional)</i></td>
<td> 
 
It can be a combination of the following values: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Preference_NoSpace</font>: no spaces will be put around the equal sign joining key and values.
                          It can be useful when dealing with external preferences files which doesn't
                          accept spaces around equal sign.
  <font color="#924B72">#PB_Preference_GroupSeparator</font>: add an empty line between the groups to ease readability of the file.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>



Nonzero if the file has been successfully created, zero otherwise. 

 

</blockquote><p><b>Remarks</b></p><blockquote>



Once created, the functions like <a href="writepreferencestring.html">WritePreferenceString()</a> can be used to write data. When values are written in preferences, 
it's possible to read them back with the functions like <a href="readpreferencestring.html">ReadPreferenceString()</a>. 
<br>
<br>
To remove a key or a group, use <a href="removepreferencekey.html">RemovePreferenceKey()</a> and <a href="removepreferencegroup.html">RemovePreferenceGroup()</a>. 
To create or change the current group, use <a href="preferencegroup.html">PreferenceGroup()</a>. 
<br>
<br>
Once all write operations are done, <a href="closepreferences.html">ClosePreferences()</a> needs to be called to really write the preferences back to disk. 

 

</blockquote><p><b>See Also</b></p><blockquote>

<a href="closepreferences.html">ClosePreferences()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=closepreferences.html>ClosePreferences()</a> - <a href=index.html>Preference Index</a> - <a href=examinepreferencegroups.html>ExaminePreferenceGroups()</a> -&gt;



</body></html>